#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include "si7006.h"

int main(int argc, const char *argv[])
{
 int fd,serial,firware;
 if((fd = open("/dev/si7006",O_RDWR)) < 0){
  perror("open error");
  exit(EXIT_FAILURE);
 }

    ioctl(fd,GET_SERIAL,&serial);
    ioctl(fd,GET_FIRWARE,&firware);

    printf("serial = %#x,firware = %#x\n",serial,firware);
 close(fd);
 return 0;
}